<template>
  <!-- 工作台相关 -->
  <div class="go-Instrument">
      <ComponentData :targetData="targetData" @add="handleComponent"></ComponentData>
       <n-scrollbar  :distance="10" >
      <ContentEdit :chartData="targetData.data.data"></ContentEdit>
        </n-scrollbar>
  </div>
  <!-- 加载蒙层 -->
  <!-- <content-load></content-load> -->
</template>

<script setup lang="ts">
//数据集
import { useThemeVars } from 'naive-ui';
import {
  provide,
  watch,ref
} from 'vue';
import ComponentData from './componentData/index.vue';
import ContentEdit from './ContentEdit/index.vue';
import {  cloneDeep} from 'lodash'
const props = defineProps({
  targetData: {
    type: Object,
    required: true
  }
})
import { useTargetData } from '@/views/Bi/hooks/useTargetData'
const updataBase = ref(false)
const chartData:any = ref([]);
//添加 数据 目前没用
const handleComponent = (item:any) =>{
      props.targetData.data.data.push(cloneDeep(item))
}
const handleupdataDataBase = () =>{
updataBase.value = !updataBase.value
}
//编辑区
// import EditComponent from './editComponent/index.vue';
const themeVars = useThemeVars()
</script>

<style lang="scss" >
@include go("Instrument") {
  display: grid;
  grid-template-rows:auto   1fr;
   padding: 10px;
   box-sizing: border-box;
  height: calc(100vh - 40px);
}

</style>
